<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<script>
function Person(name, age){
    this.name = name;
    this.age = age;
}
Person.prototype.eat = function (){
    console.log("吃" + this.name);
}
Person.prototype.speak = function (){
    console.log("说" + this.age);
}

var p1 = new Person("志玲", 41);
var p2 = new Person("志玲1", 41);

p1.eat();
p2.eat();
</script>
</body>
</html>